home *** CD-ROM | disk | FTP | other *** search
- Path: edmr54.ccinet.ab.ca!user
- From: d_martin@biomira.com (Douglas Martin)
- Newsgroups: comp.lang.c
- Subject: Re: Want single character input function for Solaris/UNIX
- Date: 4 Apr 1996 22:46:09 GMT
- Organization: Biomira Inc.
- Message-ID: <d_martin-0404961551560001@edmr54.ccinet.ab.ca>
- References: <4jrmbg$gkv@news.platinum.com>
- NNTP-Posting-Host: edmr54.ccinet.ab.ca
-
- In article <4jrmbg$gkv@news.platinum.com>, jlane@brownstone.com (Jason J.
- Lane) wrote:
-
- > Greetings,
- >
- > I need a sample program/snippet that does single character input (raw)
- > under UNIX. I'm porting code from OS/2 and it allowed me to use the
- > getch() function to retrieve a single character and act on it without
- > having the user hit <ENTER> first. Basically I'm asking the user for a
- > password and don't want it to echo to the screen. I know this involves
- > curses in some manner but I'm not a UNIX guru.
- >
- > TIA!
- >
- Wrong newsgroup. However, first of all you don't need to do raw I/O (i.e.
- character-by-character rather than line-by-line) just to turn off echoing.
- Second of all, even if you did use raw I/O, that does not require curses.
- Check out things like stty, ioctl, and friends. If it's not obvious from
- that, ask in one of the Unix newsgroups.
-
- --
- Douglas Martin d_martin@biomira.com
- Clinical Support Programmer dmartin@freenet.edmonton.ab.ca
- Biomira Inc.
- 2011 - 94 St. Edmonton
-